var app = angular.module('ma-forcebuilder', ['ui.state', 'ma-forcebuilder.controllers', 'ma-forcebuilder.filters']);

app.config(function($interpolateProvider) {
    $interpolateProvider.startSymbol('{[{');
    $interpolateProvider.endSymbol('}]}');
});

app.config(function($stateProvider){
    $stateProvider
        .state('index', {
            url: "",
            controller: 'FactionController'
        })
        .state('list', {
            url: "/{factionId}",
            views: {
                'unit-list': {
                    templateUrl: "t/unit-list.html",
                    controller : "UnitsController"
                }
            }
        })
        .state('details', {
            url: "/{factionId}/{unitId}",
            views: {
                'unit-list': {
                    templateUrl: "t/unit-list.html",
                    controller : "UnitsController"
                },
                'unit-details': {
                    templateUrl: "t/unit-details.html",
                    controller : "UnitDetailController"
                }
            }
        })
    ;
});


